package com.start_eternity.oasissafewalk.mapper;

import com.start_eternity.oasissafewalk.pojo.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface AccountMapper {
    //根据id查询当前管理信息
    @Select("select *from oasis_safe_walk.account where username = #{username}")
    Account getByName(String username);

    //更新管理员信息
    void update(Account account);
    //分页查询
    @Select("select *from oasis_safe_walk.account where id = #{id}")
    public List<Account> queryPage(Integer id);

    //管理员信息的查询
    public List<Account> list(String username, String password, String name,
                              Integer gender, String accountPic, String number,
                              LocalDate begin, LocalDate end);


}
